#ifndef MPU6050_H
#define MPU6050_H
#include <stdint.h>
#include <rtthread.h>
/* Default configuration, please change according to the actual situation, support i2c and spi device name */
#define MPU6XXX_DEVICE_NAME "i2c2"

/* 四元数结构体类型 */
typedef struct
{
    float q0;
    float q1;
    float q2;
    float q3;
} quater_info_t;

/* 欧拉角结构体类型 */
typedef struct
{
    float pitch;
    float roll;
    float yaw;
} eulerian_angles_t;

eulerian_angles_t mpu_get_eulerian_angles(float gx, float gy, float gz, float ax, float ay, float az);

uint8_t mpu6050_init();

rt_err_t mpu6050_get_data(struct mpu6xxx_3axes *accel, struct mpu6xxx_3axes *gyro);
void mpu_get_gravity(float gx, float gy, float gz, float ax, float ay, float az, float rx, float ry, float rz);

#endif
